package com.qibo.order.adapter;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.widget.TextView;

import com.noober.background.drawable.DrawableCreator;
import com.qibo.baselib.adapter.BaseViewHolder;
import com.qibo.baselib.adapter.SimpleAdapter;
import com.qibo.baselib.utils.DensityUtil;
import com.qibo.order.R;
import com.qibo.order.bean.OrderBean;

import java.util.ArrayList;
import java.util.List;

public class OrderListAdapter extends SimpleAdapter<OrderBean> {
    private Context mContext;
    private List<OrderBean> datas = new ArrayList<>();

    public OrderListAdapter(Context context, List<OrderBean> datas ) {
        super(context, R.layout.ordermodule_frag_order_item, datas);
        mContext = context;
    }
    @Override
    protected void convert(BaseViewHolder viewHoder, final OrderBean item) {
        viewHoder.getTextView(R.id.order_tv_title).setText(item.getTitile());
        TextView  order_tv_statue = viewHoder.getTextView(R.id.order_tv_statue);

        order_tv_statue.setTextColor(Color.parseColor("#f5595c"));
        order_tv_statue.setBackground(DensityUtil.setStrokeColorDrawable(context,"#ffffff","#f5595c"));

    }
}